import { createStore } from 'vuex'
//引入模块
import  category from './modules/category'
import home from './modules/home'
import product from './modules/product'
// 引入vuex数据持久化插件 vuex-persistedstate
import createPersistedState from 'vuex-persistedstate'

export default createStore({
  state: {},
  mutations: {},
  actions: {},
  modules: {
    category,
    home,
    product
  },
  plugins: [
    createPersistedState({
      key: 'erabbit-store',
      paths: ['category', 'home', 'product']
    })
  ]
})
